package com.xwn.provider.dubbo.service;

import com.xwn.bean.entity.SystemLog;
import com.xwn.provider.mapper.ISystemLogMapper;
import com.xwn.provider.repository.SystemLogRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 保存日志service
 * @Author duandw
 * @Date 2019/11/1 16:43
 **/
@Service
public class SystemLogService{

    @Autowired
    private ISystemLogMapper systemLogMapper;

    @Autowired
    private SystemLogRepository systemLogRepository;

    @Transactional(rollbackFor = Exception.class)
    public SystemLog save(SystemLog systemLog) {
        return systemLogRepository.saveAndFlush(systemLog);
    }
}
